package com.entity.sales0rder;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.sql.Timestamp;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("sales_orders")
@ApiOperation(value = "销售订单")
public class SalesOrder {

    @ApiModelProperty(value = "订单ID，主键，唯一标识每个销售订单")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "订单编号，唯一标识每个订单，不能为空")
    @TableField("order_number")
    private String orderNumber;

    @ApiModelProperty(value = "客户公司ID（订货单位）")
    @TableField("customer_company_id")
    private Long customerCompanyId;

    @ApiModelProperty(value = "订单总金额(元)")
    @TableField("total_amount")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "合同ID")
    @TableField("contract_id")
    private Long contractId;

    @ApiModelProperty(value = "销售订单日期（格式：2024.1.1）")
    @TableField("time")
    private String time;

    @ApiModelProperty(value = "订单状态：草稿、待处理、已批准、已发货、已完成")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Timestamp createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;

    @ApiModelProperty(value = "技术参数（文本格式，如功率、电压等）")
    @TableField("technical_parameters")
    private String technicalParameters;

    @ApiModelProperty(value = "销售人员意见（技术要求说明与确认）")
    @TableField("sales_person_opinion")
    private String salesPersonOpinion;

    @ApiModelProperty(value = "销售人员意见（货期确认和说明）")
    @TableField("sales_person_opinion2")
    private String salesPersonOpinion2;

    @ApiModelProperty(value = "技术负责人意见")
    @TableField("technical_person_opinion")
    private String technicalPersonOpinion;

    @ApiModelProperty(value = "生产负责人意见")
    @TableField("production_person_opinion")
    private String productionPersonOpinion;

    @ApiModelProperty(value = "批准人意见")
    @TableField("approval_person_opinion")
    private String approvalPersonOpinion;

    @ApiModelProperty(value = "制表人ID")
    @TableField("table_user_id")
    private String tableUserId;

    @ApiModelProperty(value = "核对业务员ID")
    @TableField("check_user_id")
    private String checkUserId;

    @ApiModelProperty(value = "业务员ID")
    @TableField("sales_user_id")
    private String salesUserId;
}